<?php
if (!defined('INDEX')) {
	exit ('Access Denied');
}

$parameter=act_wap_user_tbnick();
extract($parameter);
include(TPLPATH.'/inc/header_3.tpl.php');
?>
<script>
function cbCheckForm(input,$form){
	var url='<?=wap_l(MOD,ACT)?>';
	url=ddJoin(url,input);
	$.ajax({
		url: url,
		dataType:'jsonp',
		jsonp:"callback",
		success: function(data){
			if(data.s==1){
				alert('设置完成','<?=wap_l('user')?>');
			}
			else{
				alert(data.r);
			}
		}
	});
	return false;
}

function delete_tr(id){
	$("#"+id).remove();
}
</script>
 				   <div class="admin_xfl">
                    <ul>
            <li><a href="<?=wap_l('user','set')?>"  <?php if($act=='set'){?>class="on"<?php }?>>账号设置</a> </li>
            <li > <a href="<?=wap_l('user','tbnick')?>" <?php if($act=='tbnick'){?>class="on"<?php }?>>淘宝账号绑定</a> </li>
            <li > <a href="<?=wap_l('user','pwd')?>" <?php if($act=='pwd'){?>class="on"<?php }?>>修改密码</a> </li>
                    </ul>
           </div>	   
<div class="p15" align="center">   
<div class="register">
    <form onSubmit="return checkForm($(this),cbCheckForm)" action="">
    <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
			
		<tr height="40">
		  <td colspan="2" width="100" height="35" style="text-align:left"><font color="#FF0000">淘宝账号/订单号</font></td>
		</tr><?php foreach($tbnick_arr as $k=>$v){?>
		<tr height="40" <?php if($v){?>id="tbnick_tr_<?=$k?>"<?php }?> >
		  <td><input name="tbnick[<?=$k?>]" type="text" id="tbnick_<?=$k?>" value="<?=$v?>" class="ddinput"  placeholder="淘宝帐号（用于跟踪订单）" type="text"> </td> <td><?php if($v){?><span onClick="delete_tr('tbnick_tr_<?=$k?>')" title="点击删除该账号" style="color:#ff0000; margin-left:15px; cursor:pointer;">删除</span><?php }?></td>
		</tr><?php }?>
		<tr height="40">
		  <td height="90" colspan="2"> <input name="do" type="hidden" value="tbnick" ><input type="hidden" name="sub" value="1" />
          <input type="submit" value="保存信息" id="sub" class="register_dl"> 
  </td>
		  <td></td>
		</tr>
	  </table>
      </form>	 
	</div>	</div>		
	
<?php include(TPLPATH.'/inc/footer.tpl.php');?>